<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path;
request.setAttribute("basePath", basePath);
%>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>登录后主页面</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <base href="${basePath}/statics/">
    <link rel="stylesheet" href="css/font.css">
	<link rel="stylesheet" href="css/xadmin.css">
	
    <script src="js/jquery.min.js"></script>
    <script src="lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="js/xadmin.js"></script>

</head>
<body>
    <!-- 顶部开始 -->
    <div class="container">
        <div class="logo"><a href="index.html">L-admin v2.0</a></div>
        <div class="left_open">
            <i title="展开左侧栏" class="iconfont">&#xe699;</i>
        </div>
        <ul class="layui-nav right" lay-filter="">
          <li class="layui-nav-item">
            <a href="javascript:;">admin</a>
            <dl class="layui-nav-child"> <!-- 二级菜单 -->
              <dd><a href="${basePath}/toupdateuser.action">个人信息</a></dd>
              <dd><a href="${basePath}/exit.action">退出</a></dd>
            </dl>
          </li>

        </ul>
        
    </div>
    <!-- 顶部结束 -->
    <!-- 中部开始 -->
     <!-- 左侧菜单开始 -->
    <div class="left-nav">
      <div id="side-nav">
        <ul id="nav">
             <li >
                <a href="javascript:;">
                    <i class="iconfont">&#xe6eb;</i>
                    <cite>主页</cite>
                    <i class="iconfont nav_right">&#xe6a7;</i>
                </a>
                <%--<c:if test="${!empty list}">
                    <ul class="sub-menu">
                        <li><a _href="main.action"><i class="iconfont">&#xe6a7;</i><cite>后台管理</cite></a></li >
                    </ul>
                </c:if>--%>
            </li>
        </ul>
      </div>
    </div>
    <!-- <div class="x-slide_left"></div> -->
    <!-- 左侧菜单结束 -->
    <!-- 右侧主体开始 -->
   <div class="page-content">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
          <ul class="layui-tab-title">
            <li class="home"><i class="layui-icon">&#xe68e;</i>我的桌面</li>
          </ul>
		  <div class="x-body layui-anim layui-anim-up">
        <blockquote class="layui-elem-quote" >
            <span class="x-red" style="color: #0e9aef"><h1>Welcome：&nbsp;&nbsp;&nbsp;${user.userName}</h1></span></blockquote></div>
         <div class="layui-card">
          <c:if test="${!empty list}">
          <div class="layui-card-body layui-row layui-col-space10" style="text-align: center">
           <c:forEach items="${list}" var="UserAndCompany" >
              <div>
               <div class="layui-col-md12">
                   <p>公司名称</p>
                   <input type="text" name="companyName" id="companyName" value="${UserAndCompany.companyName}" autocomplete="off" class="layui-input">
              </div>
               <div class="layui-col-md12">
                   <p>用户名称</p>
                   <input type="text" name="userName" id="userName" value="${UserAndCompany.userName}" autocomplete="off" class="layui-input" readonly="readonly">
               </div>

               <div class="layui-col-md12">
                   <p>职员部门</p>
                   <input type="text" name="deptName" id="deptName" value="${UserAndCompany.deptName}" autocomplete="off" class="layui-input">
               </div>
               <div class="layui-col-md12">
                   <p>职员科室</p>
                   <input type="text" name="sectionName" id="sectionName" value="${UserAndCompany.sectionName}" autocomplete="off" class="layui-input">
               </div>
               <div class="layui-col-md12">
                   <p>职员职位</p>
                   <input type="postName" name="postName" value="${UserAndCompany.postName}" autocomplete="off" class="layui-input">
               </div>
              </div>
               <div class="layui-form-item" style="text-align: center;">
                   <div class="layui-input-block" style="margin-top: 14px; margin-left: 8px;">
                       <a href="${basePath}/userandcompany/main.action?userAndCompanyId=${UserAndCompany.userAndCompanyId}"><button class="layui-btn" lay-submit lay-filter="component-form-element">后台管理</button></a>
                   </div>
               </div>
           </c:forEach>
          </div>


       </c:if>
       <c:if test="${empty list}">
       <div class="layui-form-item" style="text-align: center">
           <div class="layui-input-block">
               <br><br><br>
               <h1>该用户尚未注册公司</h1>
               <br><br><br>
               <a href="${basePath}/System/toadd.action"><button class="layui-btn" lay-submit lay-filter="component-form-element">注册</button></a>
           </div>
       </div>
   </div>
    </c:if>
   </div>
    </div>



    <div class="page-content-bg"></div>
    <!-- 右侧主体结束 -->
    <!-- 中部结束 -->
    <!-- 底部开始 -->
    <!--<div class="footer">
        <div class="copyright">Copyright ©2019 L-admin v2.3 All Rights Reserved</div>  
    </div>-->
    <!-- 底部结束 -->
</body>
</html>